package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "token") // 指定表名为 token
public class Token extends LogicEntity {

    @Column(nullable = false, unique = true ,length = 768)
    private String tokenValue; // Token 值

    @Column(nullable = false)
    private Date expirationTime; // Token 过期时间


    @Column(nullable = false)
    private String tokenType; // Token 类型，例如 "Bearer"

    @Column(nullable = false)
    private String scope; // Token 的作用域，例如 "fbox"

    // 可选：关联的用户或设备信息
    @Column
    private String associatedId; // 关联的用户ID或设备ID


}